package com.ruoyi.web.wuliu.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.wuliu.mapper.PetroleumPaymentMapper;
import com.ruoyi.web.wuliu.domain.PetroleumPayment;
import com.ruoyi.web.wuliu.service.IPetroleumPaymentService;

/**
 * 石油支付Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-27
 */
@Service
public class PetroleumPaymentServiceImpl implements IPetroleumPaymentService 
{
    @Autowired
    private PetroleumPaymentMapper petroleumPaymentMapper;

    /**
     * 查询石油支付
     * 
     * @param id 石油支付主键
     * @return 石油支付
     */
    @Override
    public PetroleumPayment selectPetroleumPaymentById(Integer id)
    {
        return petroleumPaymentMapper.selectPetroleumPaymentById(id);
    }

    /**
     * 查询石油支付列表
     * 
     * @param petroleumPayment 石油支付
     * @return 石油支付
     */
    @Override
    public List<PetroleumPayment> selectPetroleumPaymentList(PetroleumPayment petroleumPayment)
    {
        return petroleumPaymentMapper.selectPetroleumPaymentList(petroleumPayment);
    }

    /**
     * 新增石油支付
     * 
     * @param petroleumPayment 石油支付
     * @return 结果
     */
    @Override
    public int insertPetroleumPayment(PetroleumPayment petroleumPayment)
    {
        petroleumPayment.setStatus("2");
        petroleumPayment.setPaymentTime(new Date());
        return petroleumPaymentMapper.insertPetroleumPayment(petroleumPayment);
    }

    /**
     * 修改石油支付
     * 
     * @param petroleumPayment 石油支付
     * @return 结果
     */
    @Override
    public int updatePetroleumPayment(PetroleumPayment petroleumPayment)
    {
        return petroleumPaymentMapper.updatePetroleumPayment(petroleumPayment);
    }

    /**
     * 批量删除石油支付
     * 
     * @param ids 需要删除的石油支付主键
     * @return 结果
     */
    @Override
    public int deletePetroleumPaymentByIds(Integer[] ids)
    {
        return petroleumPaymentMapper.deletePetroleumPaymentByIds(ids);
    }

    /**
     * 删除石油支付信息
     * 
     * @param id 石油支付主键
     * @return 结果
     */
    @Override
    public int deletePetroleumPaymentById(Integer id)
    {
        return petroleumPaymentMapper.deletePetroleumPaymentById(id);
    }
}
